<?php $userMsg = getLoginMsg();?>
<div class="container-fluid" style="padding: 20px 10px 0px 10px">
	<div class="row-fluid">
		<div class="well">
		    <ul class="nav nav-tabs">
		      <li class="active"><b>资料编辑</b></li>
		    </ul>
		    <div id="myTabContent" class="tab-content">
		      <div class="tab-pane active in" id="home">
		    <form id="formid" action="/user/userUpdate" method="post">
		        <input type="hidden" value="<?=$userMsg->rid?>" name="rid" />
		        <input type="hidden" value="1" name="update" />
		        <p><label style="display:inline">登陆用户</label>
		        <input type="text" value="<?=$userMsg->username?>" disabled class=""></p>
		        <p><label style="display:inline">邮箱帐号</label>
		        <input type="text" name="email" value="<?=$userMsg->email?>"  class=""></p>
		        <p><label style="display:inline">登陆密码</label>
		        <input type="password" value="" name="password" placeholder="为空不修改" type='password' class="pass_repeat_1"></p>
		        <p><label style="display:inline">重复密码</label>
		        <input type="password" value="" placeholder="为空不修改" type='password' class="pass_repeat_2"></p>
		        
		        <!--<p><label style="display:inline">在线状态</label>&nbsp;&nbsp;&nbsp;<label style="display:inline"><input type="radio" name="lineStatus" style="margin-top:1px" value="1" <?=session('kfLine'.$userMsg->rid) == '1' ? 'checked="checked"' : ''?> /> 在线</label>-->
		           <!--<label style="display:inline"><input type="radio" name="lineStatus" style="margin-top:1px" value="0" <?=session('kfLine'.$userMsg->rid) == '1' ? '' : 'checked="checked"'?> /> 下线</label>-->
		        <!--</p>-->
		    </form>
		  </div>
		  <div class="btn-toolbar">
		    <button class="btn btn-primary" id="btn-save" style="margin-left:60px;margin-top:19px"><i class="icon-save"></i> 保存</button>
		  <div class="btn-group">
		  </div>
		</div>
		
		</div>
	</div>
</div>
<script>
$(function(){
	$('#btn-save').click(function(){
		if($('input[name="email"]').val() == ''){
			showmsg('邮箱不能为空！');
		}else if($('.pass_repeat_1').val() != '' || $('.pass_repeat_2').val() != ''){
			if($('.pass_repeat_1').val() != $('.pass_repeat_2').val()){
				showmsg('两次密码不相同！');
			}else{
				$('#formid').submit();
			}
		}else{
			setBtn($('#btn-save'));
			$('#formid').submit();
		}
	})
})
</script>